package com.xian.cloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @RefreshScope 配置内容支持动态刷新
 * @Author: xlr
 * @Date: Created in 5:33 PM 2019/8/23
 */
@Slf4j
@RestController
@RefreshScope
public class TestController {

    public static final String URL_SERVER = "cloud-nacos-server";

    @Value("${alibaba.body:}")
    private String title;

    /**
     * config-server
     * @return
     */
    @GetMapping("/test/body")
    public String hello() {
        log.info( "test/body:{}",title );
        return title;
    }

}
